package hiram.util;

import com.fr.base.Env;
import com.fr.base.FRContext;
import com.fr.dav.LocalEnv;

public class EnvUtils {
	public final static String WEBREPORT_DIR = "G:/FineReport/WebReport/";
	public final static String FINEREPORT_ENV = WEBREPORT_DIR + "/WEB-INF";
	public static final String SERVLET_PATH = "http://localhost:8075/WebReport/ReportServer";
	public static final String JETTY_SERVLET_PATH = "http://localhost:8081/WebReport/ReportServer";
	public static final String INNERJETTY_SERVLET_PATH = "http://localhost:8082/WebReport/ReportServer";
	public static final String TOMCAT_SERVLET_PATH = "http://localhost:8080/WebReport/ReportServer";
	public final static String PREFIX_WRITE = "unitTest/write/";
	public final static String PREFIX_SE = "unitTest/se/";
	private static boolean isSetLocalEvn = false;

	public static void setLocalEvn() {
		if (!isSetLocalEvn) {
			isSetLocalEvn=true;
			FRContext.setCurrentEnv(new LocalEnv(FINEREPORT_ENV));
		}
	}

	public static Env getCurrentEnv() {
		setLocalEvn();
		return FRContext.getCurrentEnv();
	}
}
